<template>
  <div class="back-box">
    <div @click="goHome">
      <img src="/images/home.svg" alt="" />
    </div>
    <div @click="goLogin">
      <img src="/images/login.svg" alt="" />
    </div>
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();

const goHome = () => {
  router.push('/');
};

const goLogin = () => {
  router.push('/user/login');
};
</script>
<style scoped>
.back-box {
  border: 1px solid #dcdcdc;
  padding: 5px;
  border-radius: 5px;
  position: fixed;
  bottom: 1rem;
  right: 0.5rem;
  z-index: 1000;
}

.back-box > div {
  width: 2rem;
  height: 2rem;
  margin: 0.2rem;
}
.back-box img {
  display: block;
  width: 100%;
  height: auto;
}
</style>
